<template>
  <div class="flow-button-group">
    <el-button v-for="btn in showButtonList" :key="btn" type="primary">{{ ButtonConfig[btn].text }}</el-button>
  </div>
</template>

<script>
export default {
  name: 'FlowButtonGroup',
  props: {
    showButtonList: {
      type: Array,
      default: () => []
    }
  },
  data() {
    return {
      ButtonConfig: {
        submit: {
          text: '提交'
        },
        approve: {
          text: '同意'
        },
        reject: {
          text: '驳回'
        },
        rollback: {
          text: '撤回'
        }
      }
    };
  }
};
</script>

<style lang="scss" scoped>
.flow-button-group {
  display: flex;
  align-items: center;
}
</style>
